/**
 * Copyright (C) 2019 Baidu, Inc. All Rights Reserved.
 */
package com.bailiban.service.impl;

import java.util.List;

import com.bailiban.dao.UserDao;
import com.bailiban.dao.impl.UserDaoImpl;
import com.bailiban.pojo.User;
import com.bailiban.service.UserService;
import com.bailiban.utils.ResultMsg;

/**
 * @author zhulang
 * @version 创建时间：2019年9月28日 上午10:31:37
 */
public class UserServiceImpl implements UserService {
    private UserDao userDao = new UserDaoImpl();

    @Override
    public List<User> findAllUser() {
        List<User> list = userDao.findAllUser();
        return list;
    }

    /*
     * (non-Javadoc)
     * 
     * @see com.bailiban.service.UserService#findUserById(int)
     */
    @Override
    public User findUserById(int id) {
        User user = userDao.findUserById(id);
        return user;
    }

    /*
     * (non-Javadoc)
     * 
     * @see com.bailiban.service.UserService#addUser(com.bailiban.pojo.User)
     */
    @Override
    public ResultMsg addUser(User user) {
        ResultMsg resultMsg = userDao.addUser(user);
        return resultMsg;
    }

    /*
     * (non-Javadoc)
     * 
     * @see com.bailiban.service.UserService#findUserByidCard(java.lang.String)
     */
    @Override
    public User findUserByidCard(String idCard) {
        User user = userDao.findUserByidCard(idCard);
        return user;
    }

}
